package sng.modules.system
{
	
	import org.puremvc.as3.patterns.facade.Facade;
	
	import sng.modules.controller.*;

	public class LoginFacade extends Facade 
	{
		
		public static function getInstance():LoginFacade{
			if(instance == null){
				instance = new LoginFacade();
			}
			return instance as LoginFacade;
		}
		
		override protected function initializeController():void{
			super.initializeController();
			//registerCommand(NameSpace.FacadeStart,ApplicationCommand);
			registerCommand(NameSpace.FacadeStart,LoginCommand);
			registerCommand(NameSpace.ApplicationLogin,LoginCommand);
			registerCommand(NameSpace.HudInitUI,HudCommand);//主界面初始化UI
			registerCommand(NameSpace.HudInitData,HudCommand);//主界面初始化数据
			registerCommand(SocialSystem.SocialStart, SocialCommand);//社交系统初始化
			registerCommand(MissionSystem.MissionStart, MissionCommand);//任务系统初始化
			registerCommand(CitySystem.CityStart, CityCommand);//城建系统初始化
			registerCommand(SocialSystem.SocialFriendsCityEntryRequest, HudCommand);//访问好友列表申请
			
			registerCommand(NameSpace.HudBuildMove, HudCommand);
//			registerCommand(NameSpace.HudBuildTypeChangeRequest, HudCommand);
//			registerCommand(NameSpace.HudBuildTypeChangeRequest, HudCommand);
		}
		public function startup(app:Main):void{
			sendNotification(NameSpace.FacadeStart,app);
		}
		
	}
}